package org.springblade.modules.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.admin.dto.ElevatorSaveDto;import org.springblade.modules.admin.entity.ElevatorDetail;import org.springblade.modules.admin.vo.ElevatorDetailVO;
import org.springblade.modules.admin.vo.ElevatorVO;

import java.util.List;

public interface ElevatorDetailMapper extends BaseMapper<ElevatorDetail> {
    /**
     * 自定义分页
     *
     * @param page
     * @param elevatorDetail
     * @return
     */
    List<ElevatorDetailVO> selectElevatorDetailPage(IPage page, ElevatorDetailVO elevatorDetail);

    List<ElevatorSaveDto> downExcelDetail(@Param("elevator") ElevatorVO elevator);

	/**
	 * 校验电梯位置是否重复
	 * @param elevatorTemplateId
	 * @param elevatorAddress
	 * @return
	 */
    int checkElevatorAddress(@Param("elevatorTemplateId") Long elevatorTemplateId, @Param("elevatorAddress") String elevatorAddress);

    List<ElevatorDetail> selectByRoomIdAndElevatorAddress(@Param("roomId") String roomId,@Param("elevatorAddress") String elevatorAddress);


	/**
	 * 查询所有数据
	 * @return
	 */
    List<ElevatorDetail> listAll();
}
